package org.xworker.rap;

import org.eclipse.jetty.server.Server;
import org.xmeta.ActionContext;
import org.xmeta.Thing;
import org.xmeta.World;

public class RapMain {
    public static void main(String[] args) {
        try {
            World world = World.getInstance();
            world.init("./RAP/xworker/");

            Thing jettyServer = world.getThing("org.xworker.rap.JettyServer");
            Server server = jettyServer.doAction("start", new ActionContext());

            while (!server.isStarted()) {
                Thread.sleep(1000);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
